characteristic equation and roots of a square matrix